<%--
  Created by IntelliJ IDEA.
  User: xuweijie
  Date: 2017/4/20
  Time: 15:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/header.jsp" %>
<html>
<head>
    <meta charset="utf-8">
    <title>Home</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${Layui}/css/layui.css" media="all">
    <link rel="stylesheet" href="${Layui}/css/global.css" media="all">
    <script src="${Layui}/layui.js" charset="utf-8"></script>
    <script src="${jquery}/jquery-3.1.1.js"></script>
    <script src="${Js}/admin/admin.js"></script>
    <script>
        layui.use('element', function () {
            var element = layui.element();
            element.on('nav(demo)', function (elem) {
                layer.msg(elem.text());
            });
        });


    </script>
</head>
<body>


<div class="layui-layout layui-layout-admin">
    <div class="layui-header header header-demo">
        <div class="layui-main">
            <a class="logo" href="#">
                <img src="${Resource}/images/monkey.png" alt="logo">
            </a>

            <ul class="layui-nav" lay-filter="">
                <li class="layui-nav-item "><a href="">首页</a></li>
                <li class="layui-nav-item "><a href="/front/index/showindex" target="_blank">前台</a></li>
                <shiro:hasPermission name="user:root">
                    <li class="layui-nav-item ">
                        <a href="javascript:;">系统设置</a>
                        <dl class="layui-nav-child ">
                            <dd><a id="mauser" href="/admin/user/detail" target="iframe">后台用户管理</a></dd>
                            <dd><a href="/admin/menu" target="iframe">菜单设置</a></dd>
                            <dd><a href="/admin/role/showdetail" target="iframe">角色权限管理</a></dd>
                        </dl>
                    </li>
                </shiro:hasPermission>
                <li class="layui-nav-item ">
                    <a href="javascript:;">
                        <i class="layui-icon" style="font-size: 20px; color: #5FB878;">&#xe612;</i>
                        &nbsp;: <span style="color: #5FB878; font-size: 20px;">${username}</span>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="/admin/personalcenter/PersonalDetail" target="iframe">个人中心</a> </dd>
                    </dl>
                </li>
                <li class="layui-nav-item "><a href="/logout">退出</a></li>
            </ul>
            <span class="layui-nav-bar" style="left: 44px; top: 55px; width: 0px; opacity: 0;"></span></ul>
        </div>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree site-demo-nav">
                <c:forEach items="${showMenuVos}" var="menus" varStatus="i">
                    <c:if test="${empty menus.itemmenu}">
                        <li class="layui-nav-item"><a href="${menus.url}" target="iframe">${menus.menuname}</a></li>
                    </c:if>
                    <c:if test="${not empty menus.itemmenu}">
                        <li class="layui-nav-item layui-nav-itemed">
                            <a href="javascript:;">${menus.menuname}</a>
                            <dl class="layui-nav-child">
                                <c:forEach items="${menus.itemmenu}" var="item" varStatus="j">
                                    <dd><a href="${item.url}" target="iframe">${item.menuname}</a></dd>
                                </c:forEach>
                            </dl>
                        </li>
                    </c:if>
                </c:forEach>
            </ul>
        </div>
    </div>

    <div class="layui-body layui-tab-content site-demo">
        <iframe style="width: 100%; height: 100%;" src="" id="iframe" name="iframe" onload="changeFrameHeight()" frameborder="0">

        </iframe>
    </div>
</div>

</body>
</html>
